package com.hxkj.dao.impl;

import com.hxkj.dao.DictTypeDao;
import com.hxkj.mapper.DictTypeMapper;
import com.hxkj.domain.po.DictType;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;


/**
* 数据操作实现
*
* @author: chenwei
* @version: 1.0
* @datetime: 2018-05-21 17:59:26
*
*/
@Service("dictTypeDao")
public class DictTypeDaoImpl implements DictTypeDao {

    @Resource
    private DictTypeMapper dictTypeMapper;

    @Override
    public DictType get(Long dictTypeId) {
        return dictTypeMapper.selectByPrimaryKey(dictTypeId);
    }

    @Override
    public List<DictType> get(DictType dictType) {
        return dictTypeMapper.select(dictType);
    }

    @Override
    public int delete(Long dictTypeId) {
        return dictTypeMapper.deleteByPrimaryKey(dictTypeId);
    }

    @Override
    public int delete(DictType dictType) {
        return dictTypeMapper.delete(dictType);
    }

    @Override
    public int save(DictType dictType) {
        return dictTypeMapper.insert(dictType);
    }

    @Override
    public int update(DictType dictType) {
        return dictTypeMapper.update(dictType);
    }

    @Override
    public List<DictType> selectDictName(DictType dictType) {
        return dictTypeMapper.selectDictName(dictType);
    }

    @Override
    public List<DictType> selectDictCode(DictType dictType) {
        return dictTypeMapper.selectDictCode(dictType);
    }

    @Override
    public DictType getDictType(DictType dictType) {
        return dictTypeMapper.getDictType(dictType);
    }
}
